<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>伪类</title>
    <style>
        p::first-line{/*第一行变颜色*/
            background-color: #ffcf3d;
        }
        a::before{
            display: block;
            background-color: #7FFF00;
            content: "";
            width: 200px;
            height: 200px;
        }
        a::after{
            content: "请进";
        }
        :root{/*根目录选择器*/
            background-color: blue;
        }
    /*    选择第一个子元素*/
        ul>ol:first-child{
            background-color: #5d78a0;
        }
        /*选择最后一个子元素*/
        ul>li:last-child{
            background-color: #1B172C;
        }
        /*禁用*/
        input:disabled{
            background-color: #0d95e8;
        }
    </style>
</head>
<body>
    <a href="https://www.baidu.com/"></a>
    <ul>
        <ol>
            <li>index1</li>
            <li>index2</li>
            <li>index3</li>
        </ol>
        <li>index1</li>
        <li>index2</li>
        <li>index3</li>
        <li>index4</li>
        <li>index5</li>
    </ul>
    <input type="text" disabled>
</body>
</html>